//
//  ViewController.swift
//  httpObj
//
//  Created by bianruifeng on 2017/7/24.
//  Copyright © 2017年 bianruifeng. All rights reserved.
//

import UIKit
import Alamofire
class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
//        http://v5.pc.duomi.com/search-ajaxsearch-searchall?kw=关键字&pi=页码&pz=每页音乐数
        
        
        let parameters: Dictionary = ["kw":"青春","pi":"1","pz":"2"]
        let model = searchMo()
        model.kw = "青春"
        model.pi = "1"
        model.pz = "2"
//        HTTPClient.GET(URLString: "http://v5.pc.duomi.com/search-ajaxsearch-searchall", parameters: parameters, successed: { (reuslt) in
//            print(reuslt)
//        }) { (error) in
//            print(error!)
//
//        }
        
//        Alamofire.request("http://v5.pc.duomi.com/search-ajaxsearch-searchall",parameters:parameters).responseJSON { (response) in
//            guard let result =  response.result.value else {
//                print(response.result.error!)
//                return
//            }
//            
//            print(result)
//        }
//     
        
//        Alamofire.request("http://192.168.1.110/shareObj.php").responseJSON { (response) in
//            guard let result =  response.result.value else {
//                print(response.result.error!)
//                return
//            }
//            
//            print(result)
//        }
        HTTPClient.GET(URLString: "http://192.168.1.100/shareObj.php", parameters: nil, successed: { (result) in
            print("print(result)")
            print(result)
        }) { (error) in
            
        }
        

//        HTTPClient.GET(URLString: "http://v5.pc.duomi.com/search-ajaxsearch-searchall?kw=R%&pi=1&pz=2", parameters: nil, successed: { (result) in
//            print("------")
//            print(result)
//            print("------")
//            
//        }) { (error) in
//            print("=====")
//            print(error)
//        }
        
        
        
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

